﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace SaaS
{
    /// <summary>
    /// Summary description for BrowseAddServices
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class BrowseAddServices : System.Web.Services.WebService
    {
        [WebMethod]
        public string findItems(string criteria)
        {
            return "Item 1 - Computer|Item 2 - CPU";
        }

        [WebMethod]
        public string rankItems(string itemsCriteria)
        {
            return itemsCriteria + "\nRank: 2|1";
        }

        [WebMethod]
        public string displayItems(string items)
        {
            return "Displaying:\n"+items;
        }

        [WebMethod]
        public string verifyItem(string item)
        {
            return item+"\nVerified";
        }

        [WebMethod]
        public string retrieveItemInfo(string item)
        {
            return item + "\nThe best item we've got";
        }

        [WebMethod]
        public string findSuggestions(string item)
        {
            return item + "\nWe suggest that you also purchase a monitor.";
        }

        [WebMethod]
        public string addItemToCart(string item)
        {
            return item + "\nItem added to cart";
        }

        [WebMethod]
        public string displayCart(string input)
        {
            return "Here are your items:\n" + input;
        }
    }
}
